package com.deyuanyun.pic.ctrl.controller.dto.validata;

import com.deyuanyun.pic.common.util.ObjectUtil;
import com.deyuanyun.pic.common.util.StringUtils;
import com.deyuanyun.pic.common.validator.vinterface.ValidateInterface;
import com.deyuanyun.pic.settings.support.biz.CodeUtil;

/**
 * 验证管道是否是用户选择的
 * 
 * @author ChenKui
 * @date 2016-02-22
 */
public class RepairSuggestionRequestValidata implements ValidateInterface {

	@Override
	public <T, E,C> boolean apply(T t, E e,C c) {
		if(ObjectUtil.isNotNullEmpty(t)){
		    String repairSuggestion_ = (String)t;
	        String codeId = CodeUtil.getCodeId("REPAIR_SUGGESTED", repairSuggestion_);
	        return StringUtils.isNotEmpty(codeId);
		}
		return true;
	}

	@Override
	public String getName() {
		return null;
	}

}
